#pragma once

#include <linux/types.h>
#include <linux/spinlock.h>

struct wait_queue_entry;

typedef int (*wait_queue_func_t)(struct wait_queue_entry *wq_entry,
								 unsigned mode, int flags, uintptr_t key);

/*
 * A single wait-queue entry structure:
 */
struct wait_queue_entry
{
	void *private;
	wait_queue_func_t func;
	struct list_head entry;
	unsigned short flags;
	unsigned short added;
};
typedef struct wait_queue_entry wait_queue_entry_t;

struct wait_queue_head
{
	spinlock_t lock;
	struct list_head head;
};
typedef struct wait_queue_head wait_queue_head_t;
